#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {
    int size;
    printf("How many words do you wish to enter? ");
    if (scanf("%d", &size) != 1) {
        printf("wong input\n");
        return 1;
    }
    char **sts;
    printf("Enter %d words now.\n",size);
    for (int i = 0; i < size; ++i) {
        char st[100];
        scanf("%s", st);
        char *str = (char *) malloc(strlen(st) * sizeof(char));
        strncpy(str,st,strlen(st));
        sts[i] = str;
    }
    printf("Here are your words:\n");
    for (int j = 0; j < size; ++j) {
        puts(sts[j]);
        free(sts[j]);
    }
    return 0;
}